package com.buddies.lottery.ui.web;

import android.webkit.JavascriptInterface;

import com.blankj.utilcode.util.SPUtils;
import com.blankj.utilcode.util.ToastUtils;

public class JSAndroid extends Object {

    @JavascriptInterface
    public void openAndroid(String msg) {
        ToastUtils.showShort(msg);
    }

    @JavascriptInterface
    public void writeData(String msg) {
        SPUtils.getInstance().put("js", msg);
    }

    @JavascriptInterface
    public String giveInformation(String msg) {
        return SPUtils.getInstance().getString("js", msg);
    }

}